

public class SimpleDotCom {

	int[] locationCells;
	int numOfHits = 0;

	public void setLocationCells(int[] locs) {
		locationCells = locs;
	}

	public String checkYourself(String stringGuess) {

		String result = "miss";
		int guess = Integer.parseInt(stringGuess);

		for(int Cells : locationCells) {
			if ( guess == Cells ) {
				result = "hit";
				numOfHits++;
				break;
			}
		}

		if ( numOfHits == locationCells.length ) {
			result = "kill";
		}

		System.out.println(result);
		return result;

	}

}
